<?php
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
/*
	[天生创想] (C)2008-2011 515158 Inc.
	This is NOT a freeware, use is subject to license terms
    URL:http://www.515158.com/
*/

get_config_keytable("humancontract_e");
empty($do) && $do = 'list';
if ($do == 'edit') {
	$id = getGP('id','G','int');
	$blog = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."humancontract  WHERE id = '$id'");
	include_once('template/edit.php');

} elseif ($do == 'save') {
	
	$savetype = getGP('savetype','P');
	$id = getGP('id','P','int');
	$userid = getGP('userid','P');
	$number = getGP('number','P');
	$type = getGP('type','P');
	$ckey = getGP('ckey','P');
	$signdate = getGP('signdate','P');
	$testdate = getGP('testdate','P');
	$testday = getGP('testday','P');
	$testenddate = getGP('testenddate','P');
	$signnum = getGP('signnum','P');
	$appendix = getGP('appendix','P');
	$content = getGP('content','P');
	$signenddate = getGP('signenddate','P');
	
	
	//主表信息
	$humancontract = array(
		'userid' => $userid,
		'number' => $number,
		'type' => $type,
		'ckey' => $ckey,
		'signdate' => $signdate,
		'testdate' => $testdate,
		'testday' => $testday,
		'testenddate' => $testenddate,
		'signnum' => $signnum,
		'appendix' => $appendix,
		'content' => $content,
		'signenddate' => $signenddate
	);
	update_db('humancontract',$humancontract, array('id' => $id));
	$content=$userid.get_inc_log(1).$number.get_inc_log(1).$type.get_inc_log(1).$ckey.get_inc_log(1).$signdate.get_inc_log(1).$testdate.get_inc_log(1).$testday.get_inc_log(1).$testenddate.get_inc_log(1).$signnum.get_inc_log(1).$appendix.get_inc_log(1).$content.get_inc_log(1).$uid.get_inc_log(1).$date.get_inc_log(1).$signenddate;
	$title='修改人事合同';
	get_oa_log_dbadd($id,$content,$title,26,$_USER->id);
	goto_page('admin.php?ac=index&fileurl=humancontract&blogtype=1');
	

}

?>